function editTemplate(target) {
    var content = $(target).parent().parent().find('.content').val();
    var id      = $(target).parent().parent().find('.nodeId').val();
    xhExtra.ajaxRequest('feedback/saveTemplate',{content:content,id:id},{},function (res) {
        window.top.xhTop.showSuccess(res.msg);
        // location.reload();
    })
}

function delTemplate(target) {
    var id = $(target).parent().parent().find('.nodeId').val();
    xhExtra.ajaxRequest('feedback/delTemplate',{id:id},{},function (res) {
        window.top.xhTop.showSuccess(res.msg);
        location.reload();
    })
}

function addTemplate(target){
    var content = $(target).parent().parent().find('.content').val();
    if (!content) {
        window.top.xhTop.showError('错误', '内容不能为空');
        return false;
    }
    xhExtra.ajaxRequest('feedback/saveTemplate',{content:content},{},function (res) {
        window.top.xhTop.showSuccess(res.msg);
        location.reload();
    })
}